package com.da.javatest.leetCode;

import java.util.Arrays;

/**
 * @author chenlida
 * @date 2019/1/4 11:52
 * @description
 */
public class Code540 {
    public int singleNonDuplicate(int[] nums) {
        for (int i = 0; i < nums.length - 2; i += 2) {
            if (nums[i] != nums[i + 1]) {return nums[i];}
        }
        return nums[nums.length - 1];
    }
}
